import request from '@/utils/request'

//1. 用户登录
export function login(data) {
  return request({
    url: '/user?cmd=login',
    method: 'post',
    data
  })
}
//2. 获取用户信息
export function getInfo(token) {
  return request({
    url: '/user?cmd=info',
    method: 'get',
    params: { token }
  })
}
//3. 注销
export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
